﻿#region Using

using System;

#endregion

namespace Vk.Exceptions
{
    /// <summary>
    ///     Ошибка, связанная с вводом captcha
    /// </summary>
    public class CaptchaNeededException : ApiRequestErrorException
    {
        private readonly ApiCaptchaInfo _captchaInfo;
        private readonly ApiError _error;

        public CaptchaNeededException(ApiError error, ApiCaptchaInfo captchaInfo) : base(error)
        {
            _error = error;
            _captchaInfo = captchaInfo;
        }

        public CaptchaNeededException()
        {
        }

        public CaptchaNeededException(string message)
            : base(message)
        {
        }

        public CaptchaNeededException(string message, Exception inner)
            : base(message, inner)
        {
        }

        public override string ToString()
        {
            return string.Format("Сode: {0}, message: {1}", _error.Code, _error.Description);
        }
    }
}